package com.sky.mapper;

import com.sky.dto.DataOverViewQueryDTO;
import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @Description TODO
 * @Author dingchunlin
 * @Date 2023/8/18 17:17
 * @Version 1.0.0
 */
@Mapper
public interface UserMapper {
    /**
     * 根据openid查询用户
     * @param openid
     * @return
     */
    @Select("select * from user where openid = #{openid}")
    User getByOppenId(String openid);

    @Select("select * from user where id = #{userId}")
    User getByUserId(Long userId);

    /**
     * 插入数据
     * @param user
     */
    void insert(User user);

    String getTotalCount(String time);

    String getAddCount(String time);
}
